import Taro, {Component} from '@tarojs/taro'
import {View, Image, Text} from "@tarojs/components";

export default class UserItem extends Component {
    constructor(props) {
        super(props)
        this.state = {}
    }
    render() {
      const userItem= this.props.data.map((item, index)=>{
        return(
          <View className='user-item' key={index}>
            <View className='item'>
              <Image className='icon' src={item.src}></Image>
              <Text className='title'>{item.name}</Text>
            </View>
            <Text className='allow'> > </Text>
          </View>
        )
      })
      return (
          <View className='control'>
            {userItem}
          </View>
      )
    }
}
